package com.ht.dao;

import com.ht.bean.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface XueShengDuanDao {
    //申请维修
    @Insert("insert into equipmentrepair values(null,#{equipmentType},0,#{classes},#{student},#{remark},#{depId},1,now(),#{endTime})")
    public boolean addweixiu(Equipmentrepair equipmentrepair);
    //查询班级
    @Select("select * from Studentclass ")
    List<Studentclass> allstuclass();
    //查询班级
    @Select("select s.className from Studentclass s where classId=#{classId}")
    String stuclass(Integer classId);
    //查询部门
    @Select("select * from dep")
    List<Map> allDep();
    //查询员工
    @Select("select * from emp")
    List<Map> allemp();
    //新增
    @Insert("insert into feedback values(null,2,#{empId},#{empName},now(),#{remark},#{image},1,#{depId},#{opinion},1,#{replyTime})")
    public boolean addfankui(Feedback feedback);
    //根据id查学生
    @Select("select * from student where stuId=#{stuId}")
    Student allstubyid(Integer stuId);
    //查询学生密码
    @Select("select * from student where password = #{password}")
    Student studentpsw(@Param("password") String password);
    //修改密码
    @Update("update student set password=#{password} where stuId=#{stuId}")
    boolean xgmm(@Param("stuId") Integer stuId,@Param("password") String password);
}
